FROM ubuntu:latest

RUN apt-get update && \
    apt-get install -y \
    wget \
    git \
    git-lfs \
    python3 \
    python3-pip \
    python3-venv \
    libgl1 \
    libglib2.0-0
WORKDIR /app

COPY . .

COPY webui.sh .

# RUN pip3 config set global.index-url https://mirrors.cloud.tencent.com/pypi/simple

# RUN if [ -f ./requirements.txt ]; then \
#     pip3 install --default-timeout=300 --no-cache-dir -r ./requirements.txt -i https://mirrors.cloud.tencent.com/pypi/simple; \
# else \
#     ecbho "requirements.txt not found!"; \
# fi

RUN chmod +x webui.sh

EXPOSE 7860

ENTRYPOINT ["./webui.sh"]